class NinjaWebDebuggerController < ActionController::Base
  layout nil
  
  def show
    @log_key, @request_id = params[:key].to_sym, params[:request_id]
    @logs = NinjaWebDebugger.get_logs(@log_key, @request_id.to_i)
    render :update do |page|
  		page.replace 'ninja_debug', :file => "_debug.html.erb"
  		page.visual_effect(:toggle_blind, :debug_panel, :duration => 0.3)
  		page.toggle :debug_panel
    end
  end

  def reload
    @log_key, @request_id = params[:key].to_sym, params[:request_id]
    @logs = NinjaWebDebugger.get_logs(@log_key, @request_id.to_i)
    render :update do |page|
  		page.replace 'ninja_debug', :file => "_debug.html.erb"
  		page.toggle :debug_panel
    end
  end

end